package com.spider.demo5fileoutputStream;

import java.io.FileOutputStream;
import java.io.OutputStream;

public class FileOutputDemo1 {
    public static void main(String[] args) throws Exception {
        //目标：学会使用文件字节输出流
        //1.创建文件字节输出流管道与目标文件接通
        //OutputStream os = new FileOutputStream("day03-file-io/src/spider02-out.txt");//覆盖管道
        OutputStream os = new FileOutputStream("day03-file-io/src/spider02-out.txt",true);//追加管道

        //2.写数据
        os.write(97);

        //3.关闭管道
        os.close();
        System.out.println("数据写出完毕！");

    }
}
